import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";

import { IonicVue } from "@ionic/vue";

/* Core CSS required for Ionic components to work properly */
import "@ionic/vue/css/core.css";

/* Basic CSS for apps built with Ionic */
import "@ionic/vue/css/normalize.css";
import "@ionic/vue/css/structure.css";
import "@ionic/vue/css/typography.css";

/* Optional CSS utils that can be commented out */
import "@ionic/vue/css/padding.css";
import "@ionic/vue/css/float-elements.css";
import "@ionic/vue/css/text-alignment.css";
import "@ionic/vue/css/text-transformation.css";
import "@ionic/vue/css/flex-utils.css";
import "@ionic/vue/css/display.css";
import { setupCalendar, Calendar, DatePicker } from "v-calendar";
import "v-calendar/style.css";

// Use plugin defaults (optional)
// app.use(setupCalendar, {})

// // Use the components
// app.component('VCalendar', Calendar)
// app.component('VDatePicker', DatePicker)

/**
 * Ionic Dark Mode
 * -----------------------------------------------------
 * For more info, please see:
 * https://ionicframework.com/docs/theming/dark-mode
 */

/* @import '@ionic/vue/css/palettes/dark.always.css'; */
/* @import '@ionic/vue/css/palettes/dark.class.css'; */
import "@ionic/vue/css/palettes/dark.system.css";

/* Theme variables */
import "./theme/variables.css";

// document.body.classList.remove('dark'); // 移除黑暗模式的类
const app = createApp(App)
  .use(IonicVue)
  .use(router)
  .use(setupCalendar, {})
  .component("VCalendar", Calendar)
  .component("VDatePicker", DatePicker);

router.isReady().then(() => {
  app.mount("#app");
});
